Subject: Handling RequestFrameShape during a clone
Sent: 12/10/96 11:17 AM
Received: 12/10/96 11:43 AM
From: Rob Cope, rob@eclipseservices.com
Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
(This message is mostly about ODF based parts, but was posted to the OpenDoc list since it also deals with when parts should call RequestEmbeddedFrame)
I ran into an interesting problem using the Apple Image Viewer from the Essential Live Objects folder August DR 6 CD. Try this:
1) Open ODF Draw (any version), draw a shape
2) Embed a picture using the Apple Image Viewer
3) Select both the Image Viewer frame and the shape you drew in step 1
4) Choose Copy
5) Choose Paste
6) Land in debugger with an assert from FW_CODPart::RequestFrameShape
The assertion is caused by the fact that the part cannot find the proxy for the embedded frame that is requesting a new shape. The reason it can't find the proxy is because the Apple Image Viewer is requesting a frame shape before ODF has had a chance to create the proxy frame. To illustrate, here is the code from FW_MProxy::PrivPostClone:
The call to fPresentation->Embed is what causes the the proxy frame to be added to the proxy. However, the call to aqODEmbeddedFrame->AcquirePart(ev) is where RequestFrameShape is being called by the Apple Image Viewer